home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 May / Chip_2000-05_cd1.bin / sharewar / FFE / GRAPH.SWG / 0050_MIFF ImageMagick's Raster Format.pas < prev    next >
Pascal/Delphi Source File  |  1997-05-11  |  9KB  |  219 lines

  1. MIFF(5)                   FILE FORMATS                    MIFF(5)
  2.  
  3.  
  4.  
  5. NAME
  6.      MIFF - ImageMagick's file format for raster images.
  7.  
  8. SYNOPSIS
  9.      #include <image.h>
  10.  
  11. DESCRIPTION
  12.      A MIFF image file consist of two sections.  The first
  13.      section is composed of keywords describing the image in text
  14.      form.  The next section is the binary image data.  The two
  15.      sections are separated by a : character immediately followed
  16.      by a newline.  Generally, the first section has a form-feed
  17.      and newline proceeding the : character.   You can then list
  18.      the image keywords with more, without printing the binary
  19.      image that follows the : separator.
  20.  
  21.      Each keyword must be separated by at least one space but can
  22.      be separated with control characters such a form-feed or
  23.      newline.
  24.  
  25.      A list of valid keywords follows:
  26.  
  27.      class=DirectClass | PseudoClass
  28.           identifies the type of binary image stored within the
  29.           file.
  30.  
  31.           This keyword is optional.  If it is not specified, a
  32.           DirectClass image format is assumed.  An explanation of
  33.           DirectClass and PseudoClass image data follows this
  34.           list.
  35.  
  36.      colors=value
  37.           specifies the number of colors in the image, and for
  38.           pseudo-color images the size of the colormap.
  39.  
  40.           This keyword is optional.  However, if a colormap size
  41.           is not specified, a linear colormap is assumed for
  42.           pseudo-color images.
  43.  
  44.      columns=value
  45.           is a required keyword and specifies the number of
  46.           columns, or width in pixels, of the image.
  47.  
  48.      compression=QEncoded | RunlengthEncoded
  49.           identifies how the image stored within the file is
  50.           compressed.
  51.  
  52.           This keyword is optional.  If it is not specified, the
  53.           image is assumed to be uncompressed.  A detailed
  54.           explanation of runlength-encoded and predictive
  55.           arithmetic image compression follows this list.
  56.  
  57.      id=ImageMagick
  58.           is a required keyword and identifies this file as a
  59.           MIFF image.
  60.  
  61.      packets=value
  62.           specifies the number of compressed color packets in the
  63.           image data section.
  64.  
  65.           This keyword is optional, but recommended, for
  66.           runlength-encoded image compression.  It is required
  67.           for arithimetic encoded image compression.  A detailed
  68.           explanation of image compression follows this list.
  69.  
  70.      rows=value
  71.           is a required keyword and specifies the number of rows,
  72.           or height in pixels, of the image.
  73.  
  74.      scene=value
  75.           is an optional keyword and is a reference number for
  76.           sequencing of images.
  77.  
  78.           This keyword is typically useful for animating a
  79.           sequence of images.
  80.  
  81.      signature=value
  82.           is an optional keyword and is a character string that
  83.           uniquely identifies the image colormap.
  84.  
  85.           A unique identifier for the colormap is useful for
  86.           animating a sequence of PseudoClass images.  The
  87.           default identifier is a digital signature computed from
  88.           RSA's Data Security MD4 Digest Algorithm described in
  89.           RFC 1186, October 1990.  The colormap signature is
  90.           generally computed if scene has a value other than
  91.           zero.
  92.  
  93.      Comments can be included in the keyword section.  Comments
  94.      must begin with a { character and end with a } character.
  95.  
  96.      An example keyword section follows:
  97.  
  98.          {
  99.            Rendered via Dore by Sandy Hause.
  100.          }
  101.          id=ImageMagick
  102.          class=PseudoClass  colors=256
  103.          compression=RunlengthEncoded  packets=27601
  104.          columns=1280  rows=1024
  105.          scene=1  signature=d79e1c308aa5bbcdeea8ed63df412da9
  106.          ^L
  107.          :
  108.  
  109.      The binary image data that follows the keyword text is
  110.      stored in one of two binary classes as specified by the
  111.      class keyword: DirectClass or PseudoClass.
  112.  
  113.      Use the DirectClass class to store continuous-tone images.
  114.      DirectClass requires that the image pixels immediately
  115.      follow the keyword text and be stored as binary red, green,
  116.      and blue intensity values.  The total number of pixels
  117.      expected is equal to the number of pixel columns times the
  118.      number of pixel rows as specified by the columns and rows
  119.      keywords.
  120.  
  121.      If the compression keyword is not specified, a red, green,
  122.      and blue byte in that order is expected for each pixel of
  123.      the image.
  124.  
  125.      If compression is QEncoded, each red, green, and blue byte
  126.      intensity value is encoded using the predictive arithmetic
  127.      compression algorithm.  Use the packets keyword to specify
  128.      the total number of arithimetic encoded packets that
  129.      comprise the image.  Refer to "JPEG-9-R6 Working Draft for
  130.      Development of JPEG CD", January 1991, for implementation
  131.      specific details.
  132.  
  133.      If compression is RunlengthEncoded, each red, green, and
  134.      blue byte intensity value is followed by a count byte. This
  135.      value specifies the number of horizonally contiguous pixels
  136.      in the image of that color.  The count (0-255) is one less
  137.      than the actual number of contiguous pixels; thus a single
  138.      packet can represent from 1 up to 256 identical pixels.  The
  139.      total number of pixels specified by the individual count
  140.      bytes must add up to the number of pixel columns times the
  141.      number of pixel rows as specified by the columns and rows
  142.      keywords.  Use packets to specify the total number of
  143.      runlength-encoded packets that comprise the image.
  144.  
  145.      Use the PseudoClass class to store pseudo-color images.
  146.      PseudoClass requires that the image colormap and pseudo-
  147.      color pixels immediately follow the keyword text.  The
  148.      colormap is stored as contiguous red, green, and blue
  149.      intensity values.  The number of intensity values expected
  150.      is determined by the colors keyword.  Note, an image
  151.      colormap is restricted to at most 65535 entries.  The binary
  152.      pseudo-color image is stored as indexes into the colormap.
  153.      If the colormap size exceeds 256 entries, then each colormap
  154.      index is two bytes each with the most-significant-byte
  155.      first.  The total number of pixels expected is equal to the
  156.      number of pixel columns times the number of pixel rows as
  157.      specified by the columns and rows keywords.
  158.  
  159.      If the compression keyword is not specified, a colormap
  160.      index is expected for each pixel of the image.
  161.  
  162.      If compression is QEncoded, each colormap index is encoded
  163.      using the predictive arithmetic compression algorithm.  Use
  164.      the packets keyword to specify the total number of
  165.      arithimetic encoded packets comprise the image.  Refer to
  166.      "JPEG-9-R6 Working Draft for Development of JPEG CD",
  167.      January 1991, for implementation specific details.
  168.  
  169.      If compression is RunlengthEncoded, each colormap index is
  170.      followed by a count byte. This value  specifies the number
  171.      of horizonally contiguous pixels in the image of that color.
  172.      The count (0-255) is one less than the actual number of
  173.      contiguous pixels; thus a single packet can represent from 1
  174.      up to 256 identical pixels.  The total number of pixels
  175.      specified by the individual count bytes must add up to the
  176.      number of pixels expected in the image as specified by the
  177.      columns and rows keywords.  Use packets to specify the total
  178.      number of runlength-encoded packets that comprise the image.
  179.  
  180. SEE ALSO
  181.      display(1), animate(1), import(1), montage(1), mogrify(1),
  182.      more(1), compress(1)
  183.  
  184. COPYRIGHT
  185.      Copyright 1992 E. I. du Pont de Nemours & Company
  186.  
  187.      Permission to use, copy, modify, distribute, and sell this
  188.      software and its documentation for any purpose is hereby
  189.      granted without fee, provided that the above copyright
  190.      notice appear in all copies and that both that copyright
  191.      notice and this permission notice appear in supporting
  192.      documentation, and that the name of E. I. du Pont de Nemours
  193.      & Company not be used in advertising or publicity pertaining
  194.      to distribution of the software without specific, written
  195.      prior permission.  E. I. du Pont de Nemours & Company makes
  196.      no representations about the suitability of this software
  197.      for any purpose.  It is provided "as is" without express or
  198.      implied warranty.
  199.  
  200.      E. I. du Pont de Nemours & Company disclaims all warranties
  201.      with regard to this software, including all implied
  202.      warranties of merchantability and fitness, in no event shall
  203.      E. I. du Pont de Nemours & Company be liable for any
  204.      special, indirect or consequential damages or any damages
  205.      whatsoever resulting from loss of use, data or profits,
  206.      whether in an action of contract, negligence or other
  207.      tortious action, arising out of or in connection with the
  208.      use or performance of this software.
  209.  
  210. AUTHORS
  211.      John Cristy, E.I. du Pont de Nemours & Company Incorporated
  212.  
  213.  
  214.  
  215.  
  216.  
  217. ImageMagick         Last change: 1 July 1991                    4
  218.  
  219.